
var QQLogin = cc.Class({


    statics: {

        startLogin: function (callback) {
            var openId = GameStatusInfo.openId;
            UserInfo.openId = openId;

            BK.MQQ.Account.getNick(openId, function (openID, nickName) {
                Log.debug("开始获取QQ用户信息")
                UserInfo.userName = nickName;
                UserInfo.userImg = openID; //QQ玩一玩直接通过openID去取头像

                var systemInfo = BK.getSystemInfoSync();
                UserInfo.userSex = systemInfo.sex;
                Log.debug("获取到QQ用户信息，openId = "+openID+" nikeName="+nickName,"sex="+systemInfo.sex)
                callback(true);
            });
        },
    }
});

module.exports = QQLogin;